package com.atguigu.gulimall.order.service;

import com.atguigu.common.to.mq.SeckillOrderTo;
import com.atguigu.gulimall.order.vo.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.order.entity.OrderEntity;

import java.text.ParseException;
import java.util.Map;

/**
 * 订单
 *
 * @author bihe
 * @email 1067716908@qq.com
 * @date 2023-04-09 16:00:54
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    OrderConfirmVo getOrderConfirmVo() throws Exception;

    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo) throws Exception;

    OrderEntity getOrderByOrderSn(String orderSn);

    void closeOrder(OrderEntity orderEntity);

    PayVo getOrderPay(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    String handlePayResult(PayAsyncVo asyncVo) throws ParseException;

    void createSeckillOrderInfo(SeckillOrderTo orderTo);
}

